System and method for dynamic analysis wrapper objects for application dataflow

ABSTRACT

Systems and methods are provided for dynamic analysis wrapper objects for application dataflow. A system creates a wrapper object that points to a data object received from a data source, creates a source tracking object for the wrapper object, and records information associated with the data source into the source tracking object. The system creates a copy of the wrapper object for a tracking event in an application program, creates a flow tracking object for the tracking event, and records information associated with the tracking event into the flow tracking object as the tracking event processes the copy of the wrapper object. The system outputs the copy of the wrapper object to a data sink for the application program, creates a sink tracking object for the data sink, and records information associated with the data sink into the sink tracking object. The system outputs the source tracking object, the flow tracking object, and the sink tracking object as dynamic analysis of dataflow in the application program.

CLAIM OF PRIORITY

This application claims the benefit of U.S. Provisional PatentApplication 61/737,372 entitled ROBUST DATAFLOW TRACKING USING OBJECTWRAPPERS IN RUNTIME ANALYSIS, by Gluck, et al., filed Dec. 14, 2012(Attorney Docket No. 1090 PROV), the entire contents of which areincorporated herein by reference.

COPYRIGHT NOTICE

A portion of the disclosure of this patent document contains materialwhich is subject to copyright protection. The copyright owner has noobjection to the facsimile reproduction by anyone of the patent documentor the patent disclosure, as it appears in the Patent and TrademarkOffice patent file or records, but otherwise reserves all copyrightrights whatsoever.

Dynamic Analysis Wrapper Objects for Application Dataflow

One or more implementations relate generally to dynamic analysis wrapperobjects for application dataflow.

BACKGROUND

The subject matter discussed in the background section should not beassumed to be prior art merely as a result of its mention in thebackground section. Similarly, a problem mentioned in the backgroundsection or associated with the subject matter of the background sectionshould not be assumed to have been previously recognized in the priorart. The subject matter in the background section merely representsdifferent approaches, which in and of themselves may also be inventions.

Vulnerabilities in an application program may be introduced by untrusteddata flowing through the application program from an input to an outputwithout the application program performing sufficient actions to preventpotential cyber-security attacks from occurring. For example, anapplication program may use a uniform resource locator (URL) to receivedata that the application program subsequently outputs as data accessedby a web browser, but a web browser displaying a web page based onuntrusted data may enable an attacker to gain elevated access-privilegesto sensitive web page content. An input for untrusted data is referredto as a taint source, and the output for untrusted data is referred toas a taint sink. Static analysis that tests the security of anapplication program for vulnerabilities may produce a high rate of falsepositive results. Dynamic analysis has gained popularity due to theproduction of fewer false positive results. Therefore, if dynamicanalysis identifies a vulnerability in an application program, thevulnerability is more likely to be an actual vulnerability, therebyjustifying the expense of sufficient resources in an attempt to analyzethe application program's associated dataflow to correct thevulnerability. Dynamic analysis typically identifies application programvulnerabilities such as cross site scripting (XSS) and SQL injection(SQLi).

While dynamic analysis is able to identify application programvulnerabilities by their data sources and data sinks, dynamic analysisdoes not keep track of the complete flow of tainted data because ofproblems with recording any information in between the data source andthe data sink. Without the information of how data flows in anapplication program, correcting vulnerabilities is difficult becauseidentifying only a data source and a data sink does not provide anyclear indication of the nature of any vulnerabilities between the datasource and the data sink. Such difficulties become greater for largeapplication programs, where manually searching source code to review thedetailed data flow of possible vulnerabilities is extremely timeconsuming, and manually identifying the detailed data flow of actualvulnerabilities in the source code is nearly impossible. Additionally,an application program may have multiple possible paths from the samedata source to the same data sink. Since dynamic analysis can identifythe same vulnerability many times, dynamic analysis typically executes ade-duplication process based on the information describing thevulnerability. Since only the data sources and data sinks areidentified, the de-duplication process can mistakenly identify multipledifferent vulnerabilities that share the same data source and the samedata sink as only a single vulnerability. Therefore, identifying all ofthe actual vulnerabilities becomes more difficult without identifyingthe specific dataflow between a data source and a data sink.Accordingly, it is desirable to provide techniques that enable adatabase system to improve the performance, efficiency, and the ease ofuse of dynamic analysis of dataflow in application programs.

BRIEF SUMMARY

U.S. patent application Ser. No. 14/067,131 filed Oct. 30, 2013,entitled “System and Method for Dynamic Analysis Tracking Objects forApplication Dataflow”, which is hereby incorporated herein by reference,teaches creating copies of a data object to enable dynamic analysis totrack different copies of the same data objects that take differentpaths in an application program, such as from the same data source tothe same data sink. However, this approach does not work with all dataobjects, such as singleton or mutable data objects due to the lack of aclear way to copy such data objects. In another example, data objectsthat are connected to a socket cannot be copied because only one dataobject is allocated to a socket. In yet another example, some extremelylarge data objects may require too many system resources to copy. Evenwhen a way exists to copy a complete data object, a database system hasto maintain consistency between all of the copied data objects for theapplication program logic to function correctly. Maintaining suchconsistency may not be feasible from a resource point of view, becausethe database system may create hundreds or even thousands of copies ofan original data object when an application invokes functions onnumerous occasions. Performance degradation may result due to thecentral processing unit power and memory space required to create andstore each copy of the original data object.

The database system solves such copying challenges by creating a wrapperobject that points to a data object, substituting the wrapper object foreach instance when the original data object is referenced, and creatingcopies of the wrapper object whenever a copy of the original data objectwould have been required. This copying process works with all dataobjects, even data objects such as singleton and mutable data objectsbecause only the wrapper object is copied, as the actual data objectsare not copied The use of multiple wrapper objects pointing to a singledata object maintains consistency between all of the wrapper objects andall of the subsequent indirect references to the original data objectbecause there is only a single copy of the original data object. Theresources needed to copy and store the wrapper objects are slim as awrapper object has only two fields, a reference to the actual dataobject and a tracking object. Only a few bytes are needed to store thewrapper object with the tracking object, and copying is not a resourceextensive process anymore.

In accordance with embodiments, there are provided systems and methodsfor dynamic analysis wrapper objects for application dataflow. A systemcreates a wrapper object that points to a data object received from adata source, creates a source tracking object for the wrapper object,and records information associated with the data source into the sourcetracking object. For example, a system gets a parameter from anuntrusted data source, stores the parameter as a tainted data object,creates a wrapper object that points to the tainted data object, createsa source tracking object, embeds the source tracking object in thetainted wrapper object, and records information about the tainted datasource, and the location in an application program where the tainteddata was collected, into the embedded source tracking object.

The system creates a copy of the wrapper object for a tracking event inan application program, creates a flow tracking object for the trackingevent, and records information associated with the tracking event intothe flow tracking object as the tracking event processes the copy of thewrapper object. For example, the system creates a copy of the taintedwrapper object for the invocation of a method that uses the taintedwrapper object, creates a flow tracking object, embeds the flow trackingobject in the copy of the tainted wrapper object, and recordsinformation about the method, and the location in the applicationprogram where the method was invoked, into the embedded flow trackingobject.

The system outputs the copy of the wrapper object to a data sink for theapplication program, creates a sink tracking object for the data sink,and records information associated with the data sink into the sinktracking object. For example, the system prints the copy of the wrapperobject, creates a sink tracking object for the printing of the copy ofthe wrapper object, and records information about the printing of thecopy of the wrapper object, and the location in the application programwhere the printing occurred, into the sink tracking object.

The system outputs the source tracking object, the flow tracking object,and the sink tracking object as dynamic analysis of dataflow in theapplication program. For example, the system outputs the sink trackingobject as a first node in a graph, the flow tracking object as a secondnode in the graph, and the sink tracking object as a third node in thegraph, with the second node linked to the first node and the third nodelinked to the second node to depict the dataflow sequence of the graph.The graph and its associated information depict not only the data sourceand the data sink, but also depict the dataflow through the applicationprogram, which enables the identification of any tracking event as anadditional vulnerability. Accordingly, systems and methods are providedwhich enable a database system to improve the performance, efficiency,and the ease of use of dynamic analysis of dataflow in applicationprograms.

While one or more implementations and techniques are described withreference to an embodiment in which dynamic analysis wrapper objects forapplication dataflow is implemented in a system having an applicationserver providing a front end for an on-demand database service capableof supporting multiple tenants, the one or more implementations andtechniques are not limited to multi-tenant databases nor deployment onapplication servers. Embodiments may be practiced using other databasearchitectures, i.e., ORACLE®, DB2® by IBM and the like without departingfrom the scope of the embodiments claimed.

Any of the above embodiments may be used alone or together with oneanother in any combination. The one or more implementations encompassedwithin this specification may also include embodiments that are onlypartially mentioned or alluded to or are not mentioned or alluded to atall in this brief summary or in the abstract. Although variousembodiments may have been motivated by various deficiencies with theprior art, which may be discussed or alluded to in one or more places inthe specification, the embodiments do not necessarily address any ofthese deficiencies. In other words, different embodiments may addressdifferent deficiencies that may be discussed in the specification. Someembodiments may only partially address some deficiencies or just onedeficiency that may be discussed in the specification, and someembodiments may not address any of these deficiencies.

BRIEF DESCRIPTION OF THE DRAWINGS

In the following drawings like reference numbers are used to refer tolike elements. Although the following figures depict various examples,the one or more implementations are not limited to the examples depictedin the figures.

FIG. 1 is an operational flow diagram illustrating a high level overviewof a method for dynamic analysis wrapper objects for applicationdataflow in an embodiment;

FIG. 2 is a block diagram of a portion of example application code andits associated dataflow graph for a dynamic analysis wrapper objects forapplication dataflow;

FIG. 3 illustrates a block diagram of an example of an environmentwherein an on-demand database service might be used; and

FIG. 4 illustrates a block diagram of an embodiment of elements of FIG.3 and various possible interconnections between these elements.

DETAILED DESCRIPTION General Overview

Systems and methods are provided for dynamic analysis wrapper objectsfor application dataflow.

As used herein, the term multi-tenant database system refers to thosesystems in which various elements of hardware and software of thedatabase system may be shared by one or more customers. For example, agiven application server may simultaneously process requests for a greatnumber of customers, and a given database table may store rows for apotentially much greater number of customers. As used herein, the termquery plan refers to a set of steps used to access information in adatabase system.

Next, mechanisms and methods for dynamic analysis wrapper objects forapplication dataflow will be described with reference to exampleembodiments.

The following detailed description will first describe a method fordynamic analysis wrapper objects for application dataflow.

Next, a block diagram of a portion of example application code and itsassociated dataflow graph for dynamic analysis wrapper objects forapplication dataflow is described.

FIG. 1 is an operational flow diagram illustrating a high level overviewof a method 100 for dynamic analysis wrapper objects for applicationdataflow. As shown in FIG. 1, a database system can provide dynamicanalysis of dataflow in application programs.

In block 102, a wrapper object is created that points to a data objectreceived from a data source. For example and without limitation, thiscan include the database system getting a parameter from an untrusteddata source, storing the parameter as a tainted data object, andcreating an wrapper object that points to the tainted data object.Although this example describes the application dataflow beginning witha tainted data source, the application dataflow may begin with any pointof interest in the code, whether tainted or untainted. A data source canbe arbitrary defined as a point in the code based on whatever logic isrequired. The database system changes references to the data object toreferences to the wrapper object instead, because the wrapper objectwill become the new data object with reference to the original dataobject and taint information. Below is an example pseudo code datastructure for a wrapper object.

public class Wrapper{  private Object element  private Node node; }

In block 104, a source tracking object is created for a wrapper object.By way of example and without limitation, this can include the databasesystem creating a source tracking object for the tainted wrapper object.A tracking object may be referred to as a node object, as the trackingobject may be subsequently represented by a node in a dataflow graph.Below is an example pseudo code data structure for a tracking object,which may be for a source tracking object, a flow tracking object, or asink tracking object.

Public class Node {   private Node parents[ ];   private int datapoint;  private int taint_info; }

The parents array attribute points to the parent nodes for the currentnode. The datapoint attribute stores location identifiers about whereinformation associated with tainted data is collected. Example locationidentifiers include filenames, line numbers, etc. However, instead ofstoring a string to represent a location identifier, the database systemmay create a hashmap with an integer as the key and a string as thevalue, and subsequently lookup the hashmap for the actual location ofthe location identifier, thereby conserving database system resources.The taint_info attribute stores taint information related to thelocation associated with the tainted data, such as whether it is a datasource, a data sink, a sanitization point, etc. A sanitization point isa location in an application program designed to replace potentiallydangerous data with non-dangerous data, such as replacing hyper-textmarkup language (HTML) control characters.

In block 106, a source tracking object is optionally connected with awrapper object. In embodiments, this can include the database systemembedding the source tracking object in the tainted wrapper object,thereby enabling the tracking of taint and the associated dataflow asthe wrapper object flows through the application program. Such aconnection allows the database system to easily tie the tracking objectsand their data flows together without having to create a separateout-of-band mechanism to do this. Additionally, as described below inreference to block 126, embedding a tracking object in a tainted wrapperobject leverages the garbage collector, such that when a tracking objectis subsequently deleted, the tracking object's associated data flowinformation is removed as well, leaving the dataflow information for thetracking objects that are not deleted to represent the applicationdataflow.

In block 108, information associated with a data source is recorded intoa source tracking object. For example and without limitation, this caninclude the database system recording information about whether thetainted data source was reflective or stored, and recording line number1 in the application program where the tainted data was collected, inthe embedded source tracking object. The database system may keep trackof the context of the vulnerability, such as the nature of the potentialvulnerability (based on the location/type of taint), whether a taintedwrapper object has been validated or sanitized, and what kind ofvalidation, if any, has been done on the tainted wrapper object.Validation of a wrapper object is a verification that the wrapper objectdoes not include tainted data. The database system may also keep trackof the confidence level of the vulnerability, such as how confident thedatabase system is to classify a dataflow into a specific level ofvulnerability. For example, an application program may have taintsources from reading various external files, with some of the files moretrusted than the other files. Including a confidence level can help indefining how likely an identified dataflow is a real vulnerability. Thedatabase system may also include the capability of tracking methodinvocation on both the caller and the callee sides, which may help asystem user to better understand the connection between the wrapperobject used when calling the method and the wrapper object used withinthe called method. The database system may record the callee informationat the reporting time, and not as the process normally flows. Whenreporting information after a data sink is reached, the database systemcan report two data points per function call, at the caller side and atthe callee side.

In block 110, a copy of a wrapper object is created for a tracking eventin an application program. By way of example and without limitation,this can include the database system creating a copy of the taintedwrapper object for the invocation of a method that uses the taintedwrapper object. Creating a copy of the tainted wrapper object enablesdynamic analysis to track different copies of the same tainted wrapperobject that take different paths in the application program, such asfrom the same data source to the same data sink. Creating a copy of thetainted wrapper object is also necessary to prune the dataflow graph toremove irrelevant dataflow information, as discussed below in referenceto block 126. Creating a copy of the tainted wrapper object mayeliminate false positives and false negatives, because every data flowpath is treated independently with its privately copied wrapper objects,such that any changes to the degree of taintedness of the taintedwrapper object in one dataflow path will not be reflected by the degreeof taintedness of the tainted wrapper object in another dataflow path.

When copying the wrapper object, the database system essentially createsa new wrapper object, whose “element” field will be pointing to the sameoriginal data object to which the previously created wrapper objectpoints. Later, a new tracking object is created and embedded into thenew wrapper object, with the tracking object containing any newinformation about the tainted data. Copying the wrapper object, whichmay be referred to as “splitting the wrapper,” works with all dataobjects, such as singleton and mutable data objects because the actualdata objects are not copied. Only the wrapper object is copied, withdifferent tracking objects assigned to record taint information. Thedata object consistency is automatically maintained because there isonly a single copy of the data object. The resources needed to copy andstore the wrapper objects are slim because a wrapper object has only twofields, a reference to the actual data object and a tracking object.Only a few bytes are needed to store the wrapper object with thetracking object, and copying is not a resource extensive processanymore. An example of pseudo-code for copying a wrapper object isprovided below.

public static Wrapper split(Wrapper parent) {  Wrapper child= newWrapper( );  child.element = parent.element; // Create a new Node andassign fields to it child.node = new Node( ); child.node.datapoint =hash_lookup( current_file_name + current_line_no);child.node.parent.insert(parent.node); child.node.taint_info =calc_taint_info(parent.node.taint_info); return child; }

In block 112, a flow tracking object is created for a tracking event. Inembodiments, this can include the database system creating a flowtracking object for a tracking event, such as a method invocation or anassignment. When the application program invokes a method, the databasesystem may record an identifier of the method, the method arguments, andany instance object, into the flow tracking object, thereby enabling thedatabase system to track tainted wrapper objects for method invocationsthat use the wrapper objects as arguments. When the application programassigns an object or a value to an object, the database system recordsinformation about this assignment in the flow tracking object, therebyenabling the database system to track tainted wrapper objects as theyare passed by assignments. Similarly, the database system can recordinformation for any other type of tracking event, such as fieldaccesses, stores, array access, etc. As the tracking objects recordinformation for tracking events, the database system associates thetracking objects together to enable the creation of a complete graphthat depicts how tainted data flows in the application program. Thedatabase system associates the tracking objects together by having eachnew tracking object, which represents a new location in the data flow,point to the previous tracking object in the dataflow, such as by havingthe flow tracking object point to the source tracking object

In some cases, a single tracking object can have multiple parents, sincemultiple objects can propagate into a single object. For example, whenmultiple strings objects are concatenated, the output is a single dataobject that has multiple parents, and each of these parents tracks thedataflow to the source in which the data object was introduced.

In block 114, a flow tracking object is optionally connected with a copyof a wrapper object. For example and without limitation, this caninclude the database system embedding the flow tracking object in thecopy of the tainted wrapper object, thereby enabling the tracking of thetainted wrapper object and the associated dataflow as the taintedwrapper object flows through the application program. Such a connectionallows the database system to easily tie the tracking objects and theirdata flows together without having to create a separate out-of-bandmechanism to do this.

In block 116, information associated with a tracking event is recordedinto a flow tracking object as a tracking event processes a copy of awrapper object. By way of example and without limitation, this caninclude the database system recording information about the methodinvoked, and the line number 3 in the application program where themethod was invoked, into the embedded flow tracking object.

In block 118, a second copy of a wrapper object is optionally createdfor a second tracking event in an application program. In embodiments,this can include the database system creating a second copy of thetainted wrapper object for the invocation of a second method that usesthe tainted wrapper object. Creating another copy of the tainted wrapperobject enables the dynamic analysis to track different copies of thesame tainted wrapper object that take different paths in the applicationprogram, such as from the same data source to the same data sink.Although FIG.1 describes an example of an application program thatincludes four tracking events (source, first method, second method, andsink), an application program may include fewer or a greater number oftracking events.

In block 120, a second flow tracking object is optionally created for asecond tracking event. For example and without limitation, this caninclude the database system creating a second flow tracking object for asecond tracking event, such as an assignment or another methodinvocation. The database system associates the tracking objects togetherby having each new tracking object, which represents a new location inthe data flow, point to the previous tracking object in the dataflow,such as by having the second flow tracking object point to the sourcetracking object. In this situation, the second flow tracking object maysubsequently point to the source tracking object instead of pointing tothe first flow tracking object when the garbage collector deletes thefirst flow tracking object.

In block 122, a second flow tracking object is optionally connected witha second copy of a wrapper object. By way of example and withoutlimitation, this can include the database system embedding the secondflow tracking object in the second copy of the tainted wrapper object.Such a connection allows the database system to easily tie trackingobjects and their data flows together without having to create aseparate out-of-band mechanism to do this.

In block 124, information associated with a second tracking event isoptionally recorded into a second flow tracking object as a secondtracking event processes a second copy of a wrapper object. Inembodiments, this can include the database system recording informationabout the second invoked method, and the line number in the applicationprogram where the second method was invoked, into the embedded flowtracking object.

In block 126, a second flow tracking object is optionally deleted whenan application program lacks a subsequent reference to second copy of awrapper object. For example and without limitation, this can include thedatabase system deleting the second flow tracking object when theapplication program lacks any subsequent references to the second copyof the tainted wrapper object. In this instance, the garbage collectordeletes the second copy of the tainted wrapper object because subsequentlines in the application program do not reference the second copy of thetainted wrapper object, which means that the second copy of the taintedwrapper object does not have any impact on the final vulnerability andthe application program's dataflow. This enables the database system toprune the dataflow graph to remove the dataflow associated with thesecond copy of the tainted wrapper object as irrelevant. The garbagecollector deleting wrapper objects and their associated tracking objectsis discussed further below in reference to FIG. 2.

In block 128, a copy of a wrapper object is output to a data sink for anapplication program. By way of example and without limitation, this caninclude the database system printing the copy of the wrapper object.Although this example describes the application dataflow ending with adata sink, the application dataflow may end with any point of interestin the code. A data sink can be arbitrary defined as a point in the codebased on whatever logic is required.

In block 130, a sink tracking object is created for a data sink. Inembodiments, this can include the database system creating a sinktracking object for the printing of the copy of the wrapper object.

In block 132, a sink tracking object is optionally connected with a copyof a wrapper object. For example and without limitation, this caninclude the database system embedding the sink tracking object into thecopy of the tainted wrapper object. Such a connection allows thedatabase system to easily tie the tracking objects and their data flowstogether without having to create a separate out-of-band mechanism to dothis.

In block 134, information associated with a data sink is recorded into asink tracking object. By way of example and without limitation, this caninclude the database system recording information about the data sink,and the line number 6 in the application program where the printingoccurred, into the sink tracking object.

In block 136, a source tracking object, a flow tracking object, and asink tracking object are output as dynamic analysis of dataflow in anapplication program. In embodiments, this can include the databasesystem outputting the sink tracking object as a first node in a graph,the flow tracking object as a second node in the graph, and the sourcetracking object as a third node in the graph, with the second nodelinked to the first node and the third node linked to the second node todepict the dataflow sequence of the graph. Each node in the graphrepresents a location in the flow of a tainted wrapper object throughthe application program. As the tainted wrapper objects flowed throughthe application program, the database system collected information andrecorded the information in the tracking objects associated with thesenodes. The collection of this information and nodes represents the dataflow of a single wrapper object through the nodes being linked togetherto construct a graphic representation of the dataflow in the applicationprogram. The graph and its associated information depict not only thedata source and the data sink, but also depict the dataflow through theapplication program, which enables the identification of any trackingevent as an additional vulnerability.

Accordingly, systems and methods are provided which enable a databasesystem to improve the performance, efficiency, and the ease of use ofdynamic analysis of dataflow in application programs. The method 100 maybe repeated as desired. Although this disclosure describes the blocks102-136 executing in a particular order, the blocks 102-136 may beexecuted in a different order. Further, although the examplesillustrated in this disclosure describe the application dataflowbeginning with a tainted data source for purposes of explanation, theapplication dataflow may begin with any point of interest in the code,whether tainted or untainted. Likewise, although the examples containedherein describe a database system executing the actions, the actions maybe executed by a system that does not need to reference a database.

FIG. 2 is a block diagram of a portion of example application code andits associated dataflow graph for dynamic analysis wrapper objects forapplication dataflow in an embodiment. The block includes a portion ofexample application code 200, which includes an application code column202 and a code line number column 204. The block diagram of a portion ofexample application code and its associated dataflow graph includes alsoincludes a dataflow graph 206.

In the portion of example application code 202, an application programgets a tainted string “s” from the request in line 1, and calls afunction “foo” in line 2. The function “foo” prints a static string inline 4. After the application program returns from the function “foo”,the application program calls the function “bar” in line 3, which printsout the tainted string “s” in line 6. The database system creates newtracking objects during the tracking events, such as getting theparameter “s,” calling the function “foo,” calling the function “bar,”and printing the string “s,” with previously created tracking objectsbecoming the parents of subsequently created tracking objects. The taintinformation is stored in a hierarchical way, in which the dataflow isrepresented by chaining a series of tracking objects that were createdalong the tracking events through which that the tainted wrapper objectflows.

The dataflow graph 206 may evolve based on the following steps. When theapplication program gets the tainted string “s” from the request in line1, the database system stores the tainted string “s” in the data objectS 208, creates a wrapper object 210 that points to the data object S 208via the element 212, creates a tracking object 1 214 and embeds thetracking object 1 214 into the wrapper object 210. After the applicationprogram calls the function “foo” in line 2, the database system createsa copy of the wrapper object 216 that points to the data object S 208via the element 218, creates a tracking object 2 220, points thetracking object 2 220 to the tracking object 1 214 via the pointer 222,and embeds the tracking object 2 220 into the copy of the wrapper object216. When the application program calls the function “bar” in line 3,the database system creates a copy of the wrapper object 224 that pointsto the data object S 208 via the element 226, creates a tracking object3 228, points the tracking object 3 228 to the tracking object 1 214 viathe pointer 230, and embeds the tracking object 3 228 into the copy ofthe wrapper object 224. When the application program prints the string“s” in line 6, the database system creates a copy of the wrapper object232 that points to the data object S 208 via the element 234, creates atracking object 6 236, points the tracking object 6 236 to the trackingobject 3 228 via a pointer 238, and embeds the tracking object 6 236into the copy of the wrapper object 232. Based on the preceding, thedatabase system may indicate that the detected dataflow is {1, 2, 3, 6}.

However, this is incorrect because the ideal dataflow graph for theportion of example application code 202 is {1, 3, 6}. This idealdataflow indicates where the tainted data was introduced in line 1, howthe data flowed in the application program, such as calling the function“bar” in line 3, and eventually reached the data sink in line 6. Thedatabase system should not indicate any irrelevant events, such ascalling the function “foo” in line 2, which did not have any impact onthe final vulnerability and its dataflow.

In order to correct the dataflow {1, 2, 3, 6}, the database system hasto trim off the tracking object 2 220, which keeps the correspondingnode from being reported as part of the dataflow graph 206. The reasonis that the dataflow {1, 2} is independent from the dataflow {1, 3, 6},and reporting either dataflow should not include the other dataflow. Anytracking event will create a new branch to the dataflow and the newbranch of the dataflow is independent of other dataflows that originatedfrom its main code. Hence, the database system needs to create separatetracking objects to track the new branches of dataflow originated by thetracking events. In order to do this, the database system copies theoriginal wrapper object, such as a wrapper object that points to thestring “s” object, every time it reaches a tracking event, such ascalling the function “foo” and calling the function “bar.”

Whenever a function returns and there is no more reference to the newlycopied wrapper object, the garbage collector automatically frees thenewly copied wrapper object. As one example to illustrate this approach,whenever a new function is called, the database system copies thewrapper object and uses that copied wrapper object to replace theoriginal string object as the argument to the called function. Then, anew tracking object is created and embedded into the copied wrapperobject. At line 3, when the function “foo” called at line 2 returns, thecopied wrapper object 216 will be out of scope and garbage collectedbecause the application program includes no more reference to the copiedwrapper object 216. At that time, the associated tracking object 2 220is automatically garbage collected as well. When the application programcalls the function “bar,” the database system continues to trackdataflow from the original string S 208. Hence, when the applicationprogram reaches the sink in line 6, the dataflow 240 based on the lines{1, 3, 6} is reported as the vulnerability path because the string “s”is not sanitized, with the order reversed to be from the data source tothe data sink. The database system enables removing the taintinformation completely from all tracking objects. Whenever a taintedwrapper object reaches a data sink, the database system may climb up thetracking object tree associated with the data sink to determine if theassociated dataflow represents a vulnerability.

System Overview

FIG. 3 illustrates a block diagram of an environment 310 wherein anon-demand database service might be used. Environment 310 may includeuser systems 312, network 314, system 316, processor system 317,application platform 318, network interface 320, tenant data storage322, system data storage 324, program code 326, and process space 328.In other embodiments, environment 310 may not have all of the componentslisted and/or may have other elements instead of, or in addition to,those listed above.

Environment 310 is an environment in which an on-demand database serviceexists. User system 312 may be any machine or system that is used by auser to access a database user system. For example, any of user systems312 can be a handheld computing device, a mobile phone, a laptopcomputer, a work station, and/or a network of computing devices. Asillustrated in FIG. 3 (and in more detail in FIG. 4) user systems 312might interact via a network 314 with an on-demand database service,which is system 316.

An on-demand database service, such as system 316, is a database systemthat is made available to outside users that do not need to necessarilybe concerned with building and/or maintaining the database system, butinstead may be available for their use when the users need the databasesystem (e.g., on the demand of the users). Some on-demand databaseservices may store information from one or more tenants stored intotables of a common database image to form a multi-tenant database system(MTS). Accordingly, “on-demand database service 316” and “system 316”will be used interchangeably herein. A database image may include one ormore database objects. A relational database management system (RDMS) orthe equivalent may execute storage and retrieval of information againstthe database object(s). Application platform 318 may be a framework thatallows the applications of system 316 to run, such as the hardwareand/or software, e.g., the operating system. In an embodiment, on-demanddatabase service 316 may include an application platform 318 thatenables creation, managing and executing one or more applicationsdeveloped by the provider of the on-demand database service, usersaccessing the on-demand database service via user systems 312, or thirdparty application developers accessing the on-demand database servicevia user systems 312.

The users of user systems 312 may differ in their respective capacities,and the capacity of a particular user system 312 might be entirelydetermined by permissions (permission levels) for the current user. Forexample, where a salesperson is using a particular user system 312 tointeract with system 316, that user system has the capacities allottedto that salesperson. However, while an administrator is using that usersystem to interact with system 316, that user system has the capacitiesallotted to that administrator. In systems with a hierarchical rolemodel, users at one permission level may have access to applications,data, and database information accessible by a lower permission leveluser, but may not have access to certain applications, databaseinformation, and data accessible by a user at a higher permission level.Thus, different users will have different capabilities with regard toaccessing and modifying application and database information, dependingon a user's security or permission level.

Network 314 is any network or combination of networks of devices thatcommunicate with one another. For example, network 314 can be any one orany combination of a LAN (local area network), WAN (wide area network),telephone network, wireless network, point-to-point network, starnetwork, token ring network, hub network, or other appropriateconfiguration. As the most common type of computer network in currentuse is a TCP/IP (Transfer Control Protocol and Internet Protocol)network, such as the global internetwork of networks often referred toas the “Internet” with a capital “I,” that network will be used in manyof the examples herein. However, it should be understood that thenetworks that the one or more implementations might use are not solimited, although TCP/IP is a frequently implemented protocol.

User systems 312 might communicate with system 316 using TCP/IP and, ata higher network level, use other common Internet protocols tocommunicate, such as HTTP, FTP, AFS, WAP, etc. In an example where HTTPis used, user system 312 might include an HTTP client commonly referredto as a “browser” for sending and receiving HTTP messages to and from anHTTP server at system 316. Such an HTTP server might be implemented asthe sole network interface between system 316 and network 314, but othertechniques might be used as well or instead. In some implementations,the interface between system 316 and network 314 includes load sharingfunctionality, such as round-robin HTTP request distributors to balanceloads and distribute incoming HTTP requests evenly over a plurality ofservers. At least as for the users that are accessing that server, eachof the plurality of servers has access to the MTS' data; however, otheralternative configurations may be used instead.

In one embodiment, system 316, shown in FIG. 3, implements a web-basedcustomer relationship management (CRM) system. For example, in oneembodiment, system 316 includes application servers configured toimplement and execute CRM software applications as well as providerelated data, code, forms, webpages and other information to and fromuser systems 312 and to store to, and retrieve from, a database systemrelated data, objects, and Webpage content. With a multi-tenant system,data for multiple tenants may be stored in the same physical databaseobject, however, tenant data typically is arranged so that data of onetenant is kept logically separate from that of other tenants so that onetenant does not have access to another tenant's data, unless such datais expressly shared. In certain embodiments, system 316 implementsapplications other than, or in addition to, a CRM application. Forexample, system 316 may provide tenant access to multiple hosted(standard and custom) applications, including a CRM application. User(or third party developer) applications, which may or may not includeCRM, may be supported by the application platform 318, which managescreation, storage of the applications into one or more database objectsand executing of the applications in a virtual machine in the processspace of the system 316.

One arrangement for elements of system 316 is shown in FIG. 3, includinga network interface 320, application platform 318, tenant data storage322 for tenant data 323, system data storage 324 for system data 325accessible to system 316 and possibly multiple tenants, program code 326for implementing various functions of system 316, and a process space328 for executing MTS system processes and tenant-specific processes,such as running applications as part of an application hosting service.Additional processes that may execute on system 316 include databaseindexing processes.

Several elements in the system shown in FIG. 3 include conventional,well-known elements that are explained only briefly here. For example,each user system 312 could include a desktop personal computer,workstation, laptop, PDA, cell phone, or any wireless access protocol(WAP) enabled device or any other computing device capable ofinterfacing directly or indirectly to the Internet or other networkconnection. User system 312 typically runs an HTTP client, e.g., abrowsing program, such as Microsoft's Internet Explorer browser,Netscape's Navigator browser, Opera's browser, or a WAP-enabled browserin the case of a cell phone, PDA or other wireless device, or the like,allowing a user (e.g., subscriber of the multi-tenant database system)of user system 312 to access, process and view information, pages andapplications available to it from system 316 over network 314. Each usersystem 312 also typically includes one or more user interface devices,such as a keyboard, a mouse, trackball, touch pad, touch screen, pen orthe like, for interacting with a graphical user interface (GUI) providedby the browser on a display (e.g., a monitor screen, LCD display, etc.)in conjunction with pages, forms, applications and other informationprovided by system 316 or other systems or servers. For example, theuser interface device can be used to access data and applications hostedby system 316, and to perform searches on stored data, and otherwiseallow a user to interact with various GUI pages that may be presented toa user. As discussed above, embodiments are suitable for use with theInternet, which refers to a specific global internetwork of networks.However, it should be understood that other networks can be used insteadof the Internet, such as an intranet, an extranet, a virtual privatenetwork (VPN), a non-TCP/IP based network, any LAN or WAN or the like.

According to one embodiment, each user system 312 and all of itscomponents are operator configurable using applications, such as abrowser, including computer code run using a central processing unitsuch as an Intel Pentium® processor or the like. Similarly, system 316(and additional instances of an MTS, where more than one is present) andall of their components might be operator configurable usingapplication(s) including computer code to run using a central processingunit such as processor system 317, which may include an Intel Pentium®processor or the like, and/or multiple processor units. A computerprogram product embodiment includes a machine-readable storage medium(media) having instructions stored thereon/in which can be used toprogram a computer to perform any of the processes of the embodimentsdescribed herein. Computer code for operating and configuring system 316to intercommunicate and to process webpages, applications and other dataand media content as described herein are preferably downloaded andstored on a hard disk, but the entire program code, or portions thereof,may also be stored in any other volatile or non-volatile memory mediumor device as is well known, such as a ROM or RAM, or provided on anymedia capable of storing program code, such as any type of rotatingmedia including floppy disks, optical discs, digital versatile disk(DVD), compact disk (CD), microdrive, and magneto-optical disks, andmagnetic or optical cards, nanosystems (including molecular memory ICs),or any type of media or device suitable for storing instructions and/ordata. Additionally, the entire program code, or portions thereof, may betransmitted and downloaded from a software source over a transmissionmedium, e.g., over the Internet, or from another server, as is wellknown, or transmitted over any other conventional network connection asis well known (e.g., extranet, VPN, LAN, etc.) using any communicationmedium and protocols (e.g., TCP/IP, HTTP, HTTPS, Ethernet, etc.) as arewell known. It will also be appreciated that computer code forimplementing embodiments can be implemented in any programming languagethat can be executed on a client system and/or server or server systemsuch as, for example, C, C++, HTML, any other markup language, Java™,JavaScript, ActiveX, any other scripting language, such as VBScript, andmany other programming languages as are well known may be used. (Java™is a trademark of Sun Microsystems, Inc.).

According to one embodiment, each system 316 is configured to providewebpages, forms, applications, data and media content to user (client)systems 312 to support the access by user systems 312 as tenants ofsystem 316. As such, system 316 provides security mechanisms to keepeach tenant's data separate unless the data is shared. If more than oneMTS is used, they may be located in close proximity to one another(e.g., in a server farm located in a single building or campus), or theymay be distributed at locations remote from one another (e.g., one ormore servers located in city A and one or more servers located in cityB). As used herein, each MTS could include one or more logically and/orphysically connected servers distributed locally or across one or moregeographic locations. Additionally, the term “server” is meant toinclude a computer system, including processing hardware and processspace(s), and an associated storage system and database application(e.g., OODBMS or RDBMS) as is well known in the art. It should also beunderstood that “server system” and “server” are often usedinterchangeably herein. Similarly, the database object described hereincan be implemented as single databases, a distributed database, acollection of distributed databases, a database with redundant online oroffline backups or other redundancies, etc., and might include adistributed database or storage network and associated processingintelligence.

FIG. 4 also illustrates environment 310. However, in FIG. 4 elements ofsystem 316 and various interconnections in an embodiment are furtherillustrated. FIG. 4 shows that user system 312 may include processorsystem 312A, memory system 312B, input system 312C, and output system312D. FIG. 4 shows network 314 and system 316. FIG. 4 also shows thatsystem 316 may include tenant data storage 322, tenant data 323, systemdata storage 324, system data 325, User Interface (UI) 430, ApplicationProgram Interface (API) 432, PL/SOQL 434, save routines 436, applicationsetup mechanism 438, applications servers 400 ₁-400 _(N), system processspace 402, tenant process spaces 404, tenant management process space410, tenant storage area 412, user storage 414, and application metadata416. In other embodiments, environment 310 may not have the sameelements as those listed above and/or may have other elements insteadof, or in addition to, those listed above.

User system 312, network 314, system 316, tenant data storage 322, andsystem data storage 324 were discussed above in FIG. 3. Regarding usersystem 312, processor system 312A may be any combination of one or moreprocessors. Memory system 312B may be any combination of one or morememory devices, short term, and/or long term memory. Input system 312Cmay be any combination of input devices, such as one or more keyboards,mice, trackballs, scanners, cameras, and/or interfaces to networks.Output system 312D may be any combination of output devices, such as oneor more monitors, printers, and/or interfaces to networks. As shown byFIG. 4, system 316 may include a network interface 320 (of FIG. 3)implemented as a set of HTTP application servers 400, an applicationplatform 318, tenant data storage 322, and system data storage 324. Alsoshown is system process space 402, including individual tenant processspaces 404 and a tenant management process space 410. Each applicationserver 400 may be configured to tenant data storage 322 and the tenantdata 323 therein, and system data storage 324 and the system data 325therein to serve requests of user systems 312. The tenant data 323 mightbe divided into individual tenant storage areas 412, which can be eithera physical arrangement and/or a logical arrangement of data. Within eachtenant storage area 412, user storage 414 and application metadata 416might be similarly allocated for each user. For example, a copy of auser's most recently used (MRU) items might be stored to user storage414. Similarly, a copy of MRU items for an entire organization that is atenant might be stored to tenant storage area 412. A UI 430 provides auser interface and an API 432 provides an application programmerinterface to system 316 resident processes to users and/or developers atuser systems 312. The tenant data and the system data may be stored invarious databases, such as one or more Oracle™ databases.

Application platform 318 includes an application setup mechanism 438that supports application developers' creation and management ofapplications, which may be saved as metadata into tenant data storage322 by save routines 436 for execution by subscribers as one or moretenant process spaces 404 managed by tenant management process 410 forexample. Invocations to such applications may be coded using PL/SOQL 34that provides a programming language style interface extension to API432. A detailed description of some PL/SOQL language embodiments isdiscussed in commonly owned U.S. Pat. No. 7,730,478 entitled, METHOD ANDSYSTEM FOR ALLOWING ACCESS TO DEVELOPED APPLICATIONS VIA A MULTI-TENANTON-DEMAND DATABASE SERVICE, by Craig Weissman, filed Sep. 21, 2007,which is incorporated in its entirety herein for all purposes.Invocations to applications may be detected by one or more systemprocesses, which manages retrieving application metadata 416 for thesubscriber making the invocation and executing the metadata as anapplication in a virtual machine.

Each application server 400 may be communicably coupled to databasesystems, e.g., having access to system data 325 and tenant data 323, viaa different network connection. For example, one application server 400₁ might be coupled via the network 314 (e.g., the Internet), anotherapplication server 400 _(N-1) might be coupled via a direct networklink, and another application server 400 _(N) might be coupled by yet adifferent network connection. Transfer Control Protocol and InternetProtocol (TCP/IP) are typical protocols for communicating betweenapplication servers 400 and the database system. However, it will beapparent to one skilled in the art that other transport protocols may beused to optimize the system depending on the network interconnect used.

In certain embodiments, each application server 400 is configured tohandle requests for any user associated with any organization that is atenant. Because it is desirable to be able to add and remove applicationservers from the server pool at any time for any reason, there ispreferably no server affinity for a user and/or organization to aspecific application server 400. In one embodiment, therefore, aninterface system implementing a load balancing function (e.g., an F5Big-IP load balancer) is communicably coupled between the applicationservers 400 and the user systems 312 to distribute requests to theapplication servers 400. In one embodiment, the load balancer uses aleast connections algorithm to route user requests to the applicationservers 400. Other examples of load balancing algorithms, such as roundrobin and observed response time, also can be used. For example, incertain embodiments, three consecutive requests from the same user couldhit three different application servers 400, and three requests fromdifferent users could hit the same application server 400. In thismanner, system 316 is multi-tenant, wherein system 316 handles storageof, and access to, different objects, data and applications acrossdisparate users and organizations.

As an example of storage, one tenant might be a company that employs asales force where each salesperson uses system 316 to manage their salesprocess. Thus, a user might maintain contact data, leads data, customerfollow-up data, performance data, goals and progress data, etc., allapplicable to that user's personal sales process (e.g., in tenant datastorage 322). In an example of a MTS arrangement, since all of the dataand the applications to access, view, modify, report, transmit,calculate, etc., can be maintained and accessed by a user system havingnothing more than network access, the user can manage his or her salesefforts and cycles from any of many different user systems. For example,if a salesperson is visiting a customer and the customer has Internetaccess in their lobby, the salesperson can obtain critical updates as tothat customer while waiting for the customer to arrive in the lobby.

While each user's data might be separate from other users' dataregardless of the employers of each user, some data might beorganization-wide data shared or accessible by a plurality of users orall of the users for a given organization that is a tenant. Thus, theremight be some data structures managed by system 316 that are allocatedat the tenant level while other data structures might be managed at theuser level. Because an MTS might support multiple tenants includingpossible competitors, the MTS should have security protocols that keepdata, applications, and application use separate. Also, because manytenants may opt for access to an MTS rather than maintain their ownsystem, redundancy, up-time, and backup are additional functions thatmay be implemented in the MTS. In addition to user-specific data andtenant specific data, system 316 might also maintain system level datausable by multiple tenants or other data. Such system level data mightinclude industry reports, news, postings, and the like that are sharableamong tenants.

In certain embodiments, user systems 312 (which may be client systems)communicate with application servers 400 to request and updatesystem-level and tenant-level data from system 316 that may requiresending one or more queries to tenant data storage 322 and/or systemdata storage 324. System 316 (e.g., an application server 400 in system316) automatically generates one or more SQL statements (e.g., one ormore SQL queries) that are designed to access the desired information.System data storage 324 may generate query plans to access the requesteddata from the database.

Each database can generally be viewed as a collection of objects, suchas a set of logical tables, containing data fitted into predefinedcategories. A “table” is one representation of a data object, and may beused herein to simplify the conceptual description of objects and customobjects. It should be understood that “table” and “object” may be usedinterchangeably herein. Each table generally contains one or more datacategories logically arranged as columns or fields in a viewable schema.Each row or record of a table contains an instance of data for eachcategory defined by the fields. For example, a CRM database may includea table that describes a customer with fields for basic contactinformation such as name, address, phone number, fax number, etc.Another table might describe a purchase order, including fields forinformation such as customer, product, sale price, date, etc. In somemulti-tenant database systems, standard entity tables might be providedfor use by all tenants. For CRM database applications, such standardentities might include tables for Account, Contact, Lead, andOpportunity data, each containing pre-defined fields. It should beunderstood that the word “entity” may also be used interchangeablyherein with “object” and “table”.

In some multi-tenant database systems, tenants may be allowed to createand store custom objects, or they may be allowed to customize standardentities or objects, for example by creating custom fields for standardobjects, including custom index fields. U.S. Pat. No. 7,779,039, filedApr. 2, 2004, entitled “Custom Entities and Fields in a Multi-TenantDatabase System”, which is hereby incorporated herein by reference,teaches systems and methods for creating custom objects as well ascustomizing standard objects in a multi-tenant database system. Incertain embodiments, for example, all custom entity data rows are storedin a single multi-tenant physical table, which may contain multiplelogical tables per organization. It is transparent to customers thattheir multiple “tables” are in fact stored in one large table or thattheir data may be stored in the same table as the data of othercustomers.

While one or more implementations have been described by way of exampleand in terms of the specific embodiments, it is to be understood thatone or more implementations are not limited to the disclosedembodiments. To the contrary, it is intended to cover variousmodifications and similar arrangements as would be apparent to thoseskilled in the art. Therefore, the scope of the appended claims shouldbe accorded the broadest interpretation so as to encompass all suchmodifications and similar arrangements.

1. An apparatus for dynamic analysis wrapper objects for applicationdataflow, the apparatus comprising: a processor; and one or more storedsequences of instructions which, when executed by the processor, causethe processor to carry out the steps of: creating a wrapper object thatpoints to a data object received from a data source; creating a sourcetracking object for the wrapper object; recording information associatedwith the data source into the source tracking object; creating a copy ofthe wrapper object for a tracking event in an application program;creating a flow tracking object for the tracking event; recordinginformation associated with the tracking event into the flow trackingobject as the tracking event processes the copy of the wrapper object;outputting the copy of the wrapper object to a data sink for theapplication program; creating a sink tracking object for the data sink;recording information associated with the data sink into the sinktracking object; and outputting the source tracking object, the flowtracking object, and the sink tracking object as dynamic analysis ofdataflow in the application program.
 2. The apparatus of claim 1,wherein the steps further comprise: connecting the source trackingobject with the wrapper object; connecting the flow tracking object withthe copy of the wrapper object; and connecting the sink tracking objectwith the copy of the wrapper object.
 3. The apparatus of claim 1,wherein the tracking event comprises one of a method invocation, anassignment, field access, store, and array access.
 4. The apparatus ofclaim 1, wherein outputting the source tracking object, the flowtracking object, and the sink tracking object comprises outputting thesink tracking object as a first node in a graph, the flow trackingobject as a second node in the graph, and the source tracking object asa third node in the graph, wherein the second node is linked to thefirst node and the third node is linked to the second node to depict thedataflow sequence of the graph.
 5. The apparatus of claim 1, wherein thesteps further comprise: creating a second copy of the wrapper object fora second tracking event in the application program; creating a secondflow tracking object for the second tracking event; connecting thesecond flow tracking object with the second copy of the wrapper object;recording information associated with the second tracking event into thesecond flow tracking object as the second tracking event processes thesecond copy of the wrapper object; and deleting the second flow trackingobject when the application program lacks a subsequent reference to thesecond copy of the wrapper object.
 6. A non-transitory machine-readablemedium carrying one or more sequences of instructions for dynamicanalysis wrapper objects for application dataflow, which instructions,when executed by one or more processors, cause the one or moreprocessors to carry out the steps of: creating a wrapper object thatpoints to a data object received from a data source; creating a sourcetracking object for the wrapper object; recording information associatedwith the data source into the source tracking object; creating a copy ofthe wrapper object for a tracking event in an application program;creating a flow tracking object for the tracking event; recordinginformation associated with the tracking event into the flow trackingobject as the tracking event processes the copy of the wrapper object;outputting the copy of the wrapper object to a data sink for theapplication program; creating a sink tracking object for the data sink;recording information associated with the data sink into the sinktracking object; and outputting the source tracking object, the flowtracking object, and the sink tracking object as dynamic analysis ofdataflow in the application program.
 7. The machine-readable medium ofclaim 6, wherein the steps further comprise: connecting the sourcetracking object with the wrapper object; connecting the flow trackingobject with the copy of the wrapper object; and connecting the sinktracking object with the copy of the wrapper object.
 8. Themachine-readable medium of claim 6, wherein the tracking event comprisesone of a method invocation, an assignment, field access, store, andarray access.
 9. The machine-readable medium of claim 6, whereinoutputting the source tracking object, the flow tracking object, and thesink tracking object comprises outputting the sink tracking object as afirst node in a graph, the flow tracking object as a second node in thegraph, and the sink tracking object as a third node in the graph,wherein the second node is linked to the first node and the third nodeis linked to the second node to depict the dataflow sequence of thegraph.
 10. The machine-readable medium of claim 6, wherein the stepsfurther comprise: creating a second copy of the wrapper object for asecond tracking event in the application program; creating a second flowtracking object for the second tracking event; connecting the secondflow tracking object with the second copy of the wrapper object;recording information associated with the second tracking event into thesecond flow tracking object as the second tracking event processes thesecond copy of the wrapper object; and deleting the second flow trackingobject when the application program lacks a subsequent reference to thesecond copy of the wrapper object.
 11. A method for dynamic analysiswrapper objects for application dataflow, the method comprising:creating a wrapper object that points to a data object received from adata source; creating a source tracking object for the wrapper object;recording information associated with the data source into the sourcetracking object; creating a copy of the wrapper object for a trackingevent in an application program; creating a flow tracking object for thetracking event; recording information associated with the tracking eventinto the flow tracking object as the tracking event processes the copyof the wrapper object; outputting the copy of the wrapper object to adata sink for the application program; creating a sink tracking objectfor the data sink; recording information associated with the data sinkinto the sink tracking object; and outputting the source trackingobject, the flow tracking object, and the sink tracking object asdynamic analysis of dataflow in the application program.
 12. The methodof claim 11, wherein the method further comprises: connecting the sourcetracking object with the wrapper object; connecting the flow trackingobject with the copy of the wrapper object; and connecting the sinktracking object with the copy of the wrapper object.
 13. The method ofclaim 11, wherein the tracking event comprises one of a methodinvocation, an assignment, field access, store, and array access. 14.The method of claim 11, wherein outputting the source tracking object,the flow tracking object, and the sink tracking object comprisesoutputting the sink tracking object as a first node in a graph, the flowtracking object as a second node in the graph, and the source trackingobject as a third node in the graph, wherein the second node is linkedto the first node and the third node is linked to the second node todepict the dataflow sequence of the graph.
 15. The method of claim 11,wherein the method further comprises: creating a second copy of thewrapper object for a second tracking event in the application program;creating a second flow tracking object for the second tracking event;connecting the second flow tracking object with the second copy of thewrapper object; recording information associated with the secondtracking event into the second flow tracking object as the secondtracking event processes the second copy of the wrapper object; anddeleting the second flow tracking object when the application programlacks a subsequent reference to the second copy of the wrapper object.16. A method for transmitting code for dynamic analysis wrapper objectsfor application dataflow, the method comprising: transmitting code tocreate a wrapper object that points to a data object received from adata source; transmitting code to create a source tracking object forthe wrapper object; transmitting code to record information associatedwith the data source into the source tracking object; transmitting codeto create a copy of the wrapper object for a tracking event in anapplication program; transmitting code to create a flow tracking objectfor the tracking event; transmitting code to record informationassociated with the tracking event into the flow tracking object as thetracking event processes the copy of the wrapper object; transmittingcode to output the copy of the wrapper object to a data sink for theapplication program; transmitting code to create a sink tracking objectfor the data sink; transmitting code to record information associatedwith the data sink into the sink tracking object; and transmitting codeto output the source tracking object, the flow tracking object, and thesink tracking object as dynamic analysis of dataflow in the applicationprogram.
 17. The method for transmitting code of claim 16, wherein themethod further comprises: transmitting code to connect the sourcetracking object with the wrapper object; transmitting code to connectthe flow tracking object with the copy of the wrapper object; andtransmitting code to connect the sink tracking object with the copy ofthe wrapper object.
 18. The method for transmitting code of claim 16,wherein the tracking event comprises one of a method invocation, anassignment, field access, store, and array access.
 19. The method fortransmitting code of claim 16, wherein outputting the source trackingobject, the flow tracking object, and the sink tracking object comprisesoutputting the sink tracking object as a first node in a graph, the flowtracking object as a second node in the graph, and the source trackingobject as a third node in the graph, wherein the second node is linkedto the first node and the third node is linked to the second node todepict the dataflow sequence of the graph.
 20. The method fortransmitting code of claim 16, wherein the method further comprises:transmitting code to create a second copy of the wrapper object for asecond tracking event in the application program; transmitting code tocreate a second flow tracking object for the second tracking event;transmitting code to connect the second flow tracking object with thesecond copy of the wrapper object; transmitting code to recordinformation associated with the second tracking event into the secondflow tracking object as the second tracking event processes the secondcopy of the wrapper object; and transmitting code to delete the secondflow tracking object when the application program lacks a subsequentreference to the second copy of the wrapper object.